/*
  Copyright © 2010  Vinícius dos Santos Oliveira
  Copyright © 2010  Felipe Carlos Lima dos Santos

      This file is part of Touché.

      Touché is free software: you can redistribute it and/or modify
      it under the terms of the GNU Lesser General Public License as published
      by the Free Software Foundation, either version 3 of the License, or
      (at your option) any later version.

      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU Lesser General Public License for more details.

      You should have received a copy of the GNU Lesser General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */

#include <gst/gst.h>
#include <QtGui/QApplication>
#include <QIcon>
#include "scene.h"
#include "graphicsview.h"

int main(int argc, char *argv[])
{
    gst_init(&argc, &argv);
    QApplication a(argc, argv);
//    a.setAttribute(Qt::AA_NativeWindows,true);
    a.syncX();
    a.setApplicationName(QString::fromUtf8("Touché"));
    a.setWindowIcon(QIcon(":/gfx/svg/touche_logo.svg"));
    Touche::Scene *scene = new Touche::Scene(0., 0., 800., 480.);
    Touche::GraphicsView w(scene);
    w.setWindowTitle(a.applicationName());
    w.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    w.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    w.setMinimumSize(800, 480);
    w.setRenderHint(QPainter::Antialiasing);
#ifdef MAEMO
    w.showFullScreen();
#else
    w.show();
#endif
//    QObject::connect(&w, SIGNAL(destroyed()), scene, SLOT(deleteLater()));
    return a.exec();
}
